# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=conky
pkgver=1.19.6
pkgrel=0
pkgdesc="Advanced, highly configurable system monitor for X based on torsmo"
url="https://github.com/brndnmtthws/conky"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	alsa-lib-dev
	cairo-dev
	cmake
	curl-dev
	gawk
	glib-dev
	imlib2-dev
	libxdamage-dev
	libxext-dev
	libxft-dev
	libxinerama-dev
	libxml2-dev
	linux-headers
	lua5.4-dev
	ncurses-dev
	pango-dev
	samurai
	tolua++
	wayland-dev
	wayland-protocols
	wireless-tools-dev
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/brndnmtthws/conky/archive/v$pkgver.tar.gz"
options="!check"

build() {
	cmake -B build -G Ninja \
		-DRELEASE=ON \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_CURL=ON \
		-DBUILD_XDBE=ON \
		-DBUILD_IMLIB2=ON \
		-DBUILD_RSS=ON \
		-DBUILD_WLAN=ON \
		-DBUILD_I18N=OFF \
		-DBUILD_LUA_CAIRO=ON \
		-DBUILD_WAYLAND=ON \
		-DLUA_LIBRARIES="/usr/lib/lua5.4/liblua.so"
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
9f1900f495125c668835334239b69fc098c30fe450a384786d873eb3d3e955ff0f06ca70c3a94f47a4b38a42d4510be77efd13873411f11ff84d8bfdc2869fde  conky-1.19.6.tar.gz
"
